<?php

namespace app\models;

use yii\db\ActiveRecord;

/**
 * 接口
 * Class Api
 * @package app\models
 *
 * @property integer $id PK
 * @property string $name 名称
 * @property string $param 参数列表JSON
 */
class Api extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'param'], 'required'],
            ['name', 'string', 'max' => 32],
            ['param', 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'name' => '名称',
            'param' => '参数列表',
        ];
    }
}
